import request from '@/utils/request'

// 查询投票题目列表
export function listVoteTopic(query) {
  return request({
    url: '/vote/voteTopic/list',
    method: 'get',
    params: query
  })
}

// 查询投票题目详细
export function getVoteTopic(topicId) {
  return request({
    url: '/vote/voteTopic/' + topicId,
    method: 'get'
  })
}

// 新增投票题目
export function addVoteTopic(data) {
  return request({
    url: '/vote/voteTopic',
    method: 'post',
    data: data
  })
}

// 修改投票题目
export function updateVoteTopic(data) {
  return request({
    url: '/vote/voteTopic',
    method: 'put',
    data: data
  })
}

// 删除投票题目
export function delVoteTopic(topicId) {
  return request({
    url: '/vote/voteTopic/' + topicId,
    method: 'delete'
  })
}
